<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<link rel="stylesheet" type="text/css" href="yuxSelectMenu.css" />
	<link rel="stylesheet" type="text/css" href="interface.css" />
	<link rel="stylesheet" type="text/css" href="interfaceTable.css" />

	<!-- supporting scripts -->
	<script type="text/javascript" src="yuxCompat.js"></script>
	<script type="text/javascript" src="yuxCookies.js"></script>
	<script type="text/javascript" src="yuxSelectMenu.js"></script>
	<script type="text/javascript" src="backport.js"></script>

	<!-- main sudoku scripts -->
	<script type="text/javascript" src="BitwiseExtensions.js"></script>
	<script type="text/javascript" src="SudokuClass.js"></script>

	<!-- interface scripts -->
	<script type="text/javascript" src="interface.js"></script>
	<script type="text/javascript" src="interfaceTable.js"></script>
	<script type="text/javascript" src="interfaceInput.js"></script>
	<script type="text/javascript" src="interfaceTextIO.js"></script>
	<script type="text/javascript" src="interfaceCookieMgt.js"></script>
	<script type="text/javascript" src="interfacePresets.js"></script>
	<script type="text/javascript" src="interfaceSolver.js"></script>
	<script type="text/javascript" src="interfaceStrategyLog.js"></script>

	<!-- sudoku strategy scripts -->
	<script type="text/javascript" src="SudokuTechniqueSingles.js"></script>
	<script type="text/javascript" src="SudokuTechniqueBoxLine.js"></script>
	<script type="text/javascript" src="SudokuTechniqueSubsets.js"></script>
	<script type="text/javascript" src="SudokuTechniqueColoring.js"></script>
	<script type="text/javascript" src="SudokuTechniqueLastResort.js"></script>
	<script type="text/javascript" src="DancingLinks.js"></script>
	<script type="text/javascript" src="SudokuTechniqueExactCover.js"></script>

	<title>Sudoku Solver</title>
</head>

<body>
	<noscript><div class="notice">JavaScript is not enabled.</div></noscript>
	<div id="content">

	<div class="sidecolumn">
		<input class="button" type="button" style="height: 40px; font-weight: bold;" onclick="Solver(LogicalHandler);" value="Solve (Default)" />
		<fieldset id="SolutionPanel">
			<legend>Common Techniques</legend>
			<p>Some common solving techniques used by human players. (<a href="http://www.sudopedia.org/wiki/Solving_Technique">Ref</a>)</p>
			<div style="text-align: center;">
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategySingles');" value="Singles" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyHiddenSingles');" value="Hidden Singles" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyLockedCandidates');" value="Locked Candidates" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyNakedSubset');" value="Naked Subsets" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyHiddenSubset');" value="Hidden Subsets" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyFish');" value="X-Wing / N-Fish" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyMultiColoring');" value="Multi Coloring" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategyAPE');" value="Aligned Pair Exclusion" />
			<input class="button" type="button" onclick="SolverIndividualTechnique('strategy3DMedusa');" value="3D Medusa" />
			</div>
		</fieldset>
		<fieldset id="GuessingPanel">
			<legend>Nishio</legend>
			<p><a href="http://www.sudokuoftheday.com/pages/techniques-11.php?print=1">Nishio</a> is a guesswork technique. (Kind of slow)</p>
			<div style="text-align: center;">
			<input class="button" type="button" onclick="Solver(NishioHandler);" value="Nishio" />
			</div>
		</fieldset>
		<fieldset id="ExactCoverPanel">
			<legend>Exact Cover</legend>
			<p>Remodels the puzzle into an <a href="http://en.wikipedia.org/wiki/Exact_cover">Exact Cover</a> problem.</p>
			<div style="text-align: center;">
			<input class="button" type="button" onclick="Solver(ExactCoverHandler);" value="Exact Cover" />
			</div>
		</fieldset>
		<div id="test"></div>
		<fieldset id="LogPanel">
		<legend>Strategy Log</legend>
		<div id="LogPanelDiv">&nbsp;</div>
		</fieldset>
	</div>

	<div class="midcolumn" id="midcolumn">
		<fieldset id="FilterFieldSet" class="bottom">
			<legend>Highlight and Filter</legend>
			<input type="radio" name="highlight" value="1" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_1" /><label for="highlight_1">1</label>
			<input type="radio" name="highlight" value="2" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_2" /><label for="highlight_2">2</label>
			<input type="radio" name="highlight" value="4" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_3" /><label for="highlight_3">3</label>
			<input type="radio" name="highlight" value="8" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_4" /><label for="highlight_4">4</label>
			<input type="radio" name="highlight" value="16" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_5" /><label for="highlight_5">5</label>
			<input type="radio" name="highlight" value="32" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_6" /><label for="highlight_6">6</label>
			<input type="radio" name="highlight" value="64" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_7" /><label for="highlight_7">7</label>
			<input type="radio" name="highlight" value="128" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_8" /><label for="highlight_8">8</label>
			<input type="radio" name="highlight" value="256" onclick="SudokuUI.controller.setHighlight(this.value)" id="highlight_9" /><label for="highlight_9">9</label>
			<input type="radio" name="highlight" value="0" onclick="SudokuUI.controller.setHighlight(this.value)" checked="checked" id="highlight_default" /><label for="highlight_default">Default</label>
			<hr />
			<input type="checkbox" name="notation_filter" value="1" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_1" /><label for="filter_1">1</label>
			<input type="checkbox" name="notation_filter" value="2" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_2" /><label for="filter_2">2</label>
			<input type="checkbox" name="notation_filter" value="4" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_3" /><label for="filter_3">3</label>
			<input type="checkbox" name="notation_filter" value="8" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_4" /><label for="filter_4">4</label>
			<input type="checkbox" name="notation_filter" value="16" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_5" /><label for="filter_5">5</label>
			<input type="checkbox" name="notation_filter" value="32" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_6" /><label for="filter_6">6</label>
			<input type="checkbox" name="notation_filter" value="64" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_7" /><label for="filter_7">7</label>
			<input type="checkbox" name="notation_filter" value="128" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_8" /><label for="filter_8">8</label>
			<input type="checkbox" name="notation_filter" value="256" onclick="SudokuUI.controller.setFilter(this.value,this.checked)" checked="checked" id="filter_9" /><label for="filter_9">9</label>
			<input class="button" type="button" onclick="SudokuUI.controller.setAllFilters(true);" value="All" />
			<input class="button" type="button" onclick="SudokuUI.controller.setAllFilters(false);" value="None" />
		</fieldset>
		<fieldset id="CookieControl" class="bottom">
			<legend>Puzzles in Cookie</legend>
			<div id="CookieGrids" class="SavedGrids">
			</div>
			<div style="text-align: right;">
			<input class="button" type="button" onclick="SudokuUI.cookieMgt.save(SudokuUI.clueGrid);" value="Save Puzzle" />
			<input class="button" type="button" onclick="SudokuUI.cookieMgt.deleteSelection();" id="DeleteCookieButton" disabled="disabled" value="Delete Selection" />
			</div>
		</fieldset>
		<fieldset id="preset" class="bottom">
			<legend>Presets</legend>
			<div id="PresetGrids" class="SavedGrids">
			</div>
		</fieldset>
	</div>

	<div class="sidecolumn">
		<input class="button" type="button" onclick="SudokuUI.controller.reloadPage();" value="Start Anew" />

		<fieldset id="EditFieldSet">
			<legend>Editing</legend>
			<input type="radio" name="edit_mode" value="clues" checked="checked" onclick="SwitchEditMode(this.value)" id="edit_mode_clues" /><label for="edit_mode_clues">Clues</label><br />
			<input type="radio" name="edit_mode" value="values" onclick="SwitchEditMode(this.value)" id="edit_mode_values" /><label for="edit_mode_values">Values</label><br />
		</fieldset>

		<fieldset id="NotationModeFieldSet">
			<legend>Notations</legend>
			<input type="radio" name="notations_type" value="calculated_candidates" checked="checked" onclick="SudokuUI.controller.setNotationSrc(this.value)" id="notations_type_calculated_candidates" /><label for="notations_type_calculated_candidates">Calculated</label><br />
			<input type="radio" name="notations_type" value="notations" onclick="SudokuUI.controller.setNotationSrc(this.value)" id="notations_type_notations" /><label for="notations_type_notations">Solution grid</label><br />
			<input type="radio" name="notations_type" value="none" onclick="SudokuUI.controller.setNotationSrc(this.value)" id="notations_type_none" /><label for="notations_type_none">None</label><br />
		</fieldset>

		<fieldset id="TextControl">
			<legend>Text</legend>
			<div style="text-align: center;">
			<input class="button" type="button" onclick="SudokuUI.textIO.displayOutput(SudokuUI.clueGrid);" value="Clues To Text" />
			<input class="button" type="button" onclick="SudokuUI.textIO.displayOutput(SudokuUI.progressGrid);" value="Grid To Text" />
			<hr />
			<input class="button" type="button" onclick="SudokuUI.textIO.prepareInput();" value="Load from text" />
			<textarea id="sudoku_text" style="display: none;" rows="12" cols="12">
			</textarea>
			<input type="button" id="sudoku_text_button" style="display: none;" onclick="SudokuUI.textIO.loadInput()" value="Load / Close" />
			</div>
		</fieldset>

		<fieldset id="SysReq">
			<legend>Browser support</legend>
			<p>IE 5+, Firefox (all ver), Netscape 6.1+, Opera 7+, Safari 3+, Chrome.</p>
			<hr />
			<p>XHTML 1.1, CSS 2, W3C DOM, ECMAScript 3</p>
			<hr />
			<p>Solving features may freeze on old browsers or slow machines.</p>
		</fieldset>
	</div>
	</div>
</body>
</html>
